<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  methods: {
    setUserInfo() {
      var userInfo = {
        openId: "13216484256",
        nickName: "阿巴阿巴阿巴",
        avatarUrl:
          "https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIbWFEIJj8IpGeHM7dGic1aTFZALjWcMm9ltWfFiaQfVRYticWBfgGfzXWMt2EkJWiaicPtftHAlWxUibxQ/132",
      };

      var openId = userInfo.openId;
      localStorage.setItem("userInfo", JSON.stringify(userInfo));
      localStorage.setItem("openId", openId);
    },
  },
  created() {
    this.setUserInfo();
    this.$store.dispatch('asyncGetCartCount');
  },
};
</script>

<style lang="scss">
* {
  padding: 0;
  margin: 0;
}

body,html{
  font-size: 12px;
}

#app {
  min-height: 100vh;
  background-color: #f4f4f4;
  font-size: 12px;
}
</style>
